#{extends 'main.html' /}
<h2><a style ="color:#400040;" href = "@{Projects.showProject((Long)project.getEntityId())}">${project.name}</a> 
	> <a style ="color:#400040;" href="@{Tasks.showAllProjectTasks((Long)project.getEntityId())}">Tasks</a> 
		> Suggest Assignee</h2>
<hr/>
#{form @Tasks.suggestDeveloperToTask(userId,taskId)}
	#{if freeTasks.isEmpty()}
		There are no tasks available that do not have an assignee.
	#{/if}
	#{else}
		<select name = "userId" id="userId">
			#{list items:devInProject, as:'developer'}
				<option value = ${developer.getEntityId()}>${developer.firstName}${developer.lastName} <option>
				<br/>
			#{/list}
		</select>
		<select name = "taskId" id ="taskId"><br/><br/>
			#{list items:freeTasks, as:'task'}
				<option value = ${task.getEntityId()}>${task.description} <option>
				<br/>
			#{/list}
		</select><br/><br/>
		<input type="submit" name="submit" id="submit_btn" value="Submit" /> 
	#{/else}
#{/form}